package com.annotation;
import org.junit.Test;

import javax.annotation.PostConstruct;

public class AnnotationTest {
    @Test
    public void annotationTest(){
        @SuppressWarnings("super")
        Person p1 = new Person("张三");
        System.out.println(p1.name);


    }

}





class Person {

    String name;
    int age;
    @Deprecated
    public Person() {
    }

    @Deprecated
    public Person(String name) {
        this.name = name;
    }

    public void eat(String name) {
        System.out.println("人吃饭");
    }

    public void walk() {
        System.out.println("人走路");
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}

class Student extends Person {

    @Override
    public void eat(String name) {
        System.out.println(name + "学生吃饭");
    }

    @Override
    public void walk() {
        System.out.println("学生走路");
    }
}


